package com.ply.flashsalessystem.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ply.flashsalessystem.entity.pojo.UserAmount;
import com.ply.flashsalessystem.entity.vo.UserAmountVo;
import com.ply.flashsalessystem.entity.wrapper.UserWrapper;
import com.ply.flashsalessystem.mapper.UserAmountMapper;
import com.ply.flashsalessystem.service.UserAmountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author XiaoPan
 * @since 2022-03-23
 */
@Service
public class UserAmountServiceImpl extends ServiceImpl<UserAmountMapper, UserAmount> implements UserAmountService {
    @Autowired
    UserAmountMapper userAmountMapper;


    /**
     * 分页查询 用户流水记录
     * @param current
     * @param limit
     * @param userWrapper
     * @return
     */
    @Override
    public Page<UserAmountVo> getAmount(Integer current, Integer limit, UserWrapper userWrapper) {
        return userAmountMapper.getAmount(new Page<>(current,limit),userWrapper);
    }

}
